https://leetcode.cn/problems/letter-combinations-of-a-phone-number/
class Solution {
public:
    string arr[10]={"","","abc","def","ghi","jkl","mno","pqrs","tuv","xwyz"};
    vector<string> ret;
    string path;

    void dfs(string &digits,int pos)
    {
        if(digits.size()==pos)
        {
            ret.push_back(path);
            return ;
        }
        int n=digits[pos]-'0';
        for(auto ch:arr[n])
        {
            path+=ch;
            dfs(digits,pos+1);
            path.pop_back();

        }
        
    }
    vector<string> letterCombinations(string& digits) {
        if(digits.empty())
            return ret;
        dfs(digits,0);
        return ret;
    }
};